home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Bank smakow / BankSmakow.air / BankSmakow.swf / scripts / mx / effects / MaskEffect.as < prev    next >
Text File  |  2009-12-16  |  3KB  |  111 lines

  1. package mx.effects
  2. {
  3.    import flash.events.EventDispatcher;
  4.    import mx.core.mx_internal;
  5.    import mx.effects.effectClasses.MaskEffectInstance;
  6.    import mx.events.TweenEvent;
  7.    
  8.    use namespace mx_internal;
  9.    
  10.    public class MaskEffect extends Effect
  11.    {
  12.       
  13.       mx_internal static const VERSION:String = "3.5.0.12683";
  14.       
  15.       private static var AFFECTED_PROPERTIES:Array = ["visible"];
  16.        
  17.       
  18.       public var createMaskFunction:Function;
  19.       
  20.       public var xFrom:Number;
  21.       
  22.       public var yFrom:Number;
  23.       
  24.       public var scaleEasingFunction:Function;
  25.       
  26.       mx_internal var persistAfterEnd:Boolean = false;
  27.       
  28.       public var moveEasingFunction:Function;
  29.       
  30.       public var scaleXFrom:Number;
  31.       
  32.       public var scaleYFrom:Number;
  33.       
  34.       public var xTo:Number;
  35.       
  36.       public var yTo:Number;
  37.       
  38.       private var _showExplicitlySet:Boolean = false;
  39.       
  40.       public var scaleXTo:Number;
  41.       
  42.       public var scaleYTo:Number;
  43.       
  44.       private var _showTarget:Boolean = true;
  45.       
  46.       public function MaskEffect(param1:Object = null)
  47.       {
  48.          super(param1);
  49.          instanceClass = MaskEffectInstance;
  50.          hideFocusRing = true;
  51.       }
  52.       
  53.       override protected function initInstance(param1:IEffectInstance) : void
  54.       {
  55.          var _loc2_:MaskEffectInstance = null;
  56.          super.initInstance(param1);
  57.          _loc2_ = MaskEffectInstance(param1);
  58.          if(_showExplicitlySet)
  59.          {
  60.             _loc2_.showTarget = showTarget;
  61.          }
  62.          _loc2_.xFrom = xFrom;
  63.          _loc2_.yFrom = yFrom;
  64.          _loc2_.xTo = xTo;
  65.          _loc2_.yTo = yTo;
  66.          _loc2_.scaleXFrom = scaleXFrom;
  67.          _loc2_.scaleXTo = scaleXTo;
  68.          _loc2_.scaleYFrom = scaleYFrom;
  69.          _loc2_.scaleYTo = scaleYTo;
  70.          _loc2_.moveEasingFunction = moveEasingFunction;
  71.          _loc2_.scaleEasingFunction = scaleEasingFunction;
  72.          _loc2_.createMaskFunction = createMaskFunction;
  73.          _loc2_.mx_internal::persistAfterEnd = mx_internal::persistAfterEnd;
  74.          EventDispatcher(_loc2_).addEventListener(TweenEvent.TWEEN_START,tweenEventHandler);
  75.          EventDispatcher(_loc2_).addEventListener(TweenEvent.TWEEN_UPDATE,tweenEventHandler);
  76.          EventDispatcher(_loc2_).addEventListener(TweenEvent.TWEEN_END,tweenEventHandler);
  77.       }
  78.       
  79.       protected function tweenEventHandler(param1:TweenEvent) : void
  80.       {
  81.          dispatchEvent(param1);
  82.       }
  83.       
  84.       override public function set hideFocusRing(param1:Boolean) : void
  85.       {
  86.          super.hideFocusRing = param1;
  87.       }
  88.       
  89.       override public function get hideFocusRing() : Boolean
  90.       {
  91.          return super.hideFocusRing;
  92.       }
  93.       
  94.       public function set showTarget(param1:Boolean) : void
  95.       {
  96.          _showTarget = param1;
  97.          _showExplicitlySet = true;
  98.       }
  99.       
  100.       public function get showTarget() : Boolean
  101.       {
  102.          return _showTarget;
  103.       }
  104.       
  105.       override public function getAffectedProperties() : Array
  106.       {
  107.          return AFFECTED_PROPERTIES;
  108.       }
  109.    }
  110. }
  111.